<?php

namespace App\Http\Resources;


use Illuminate\Http\Resources\Json\JsonResource;


class AdsConfigResource extends JsonResource
{
    public function toArray($request): array
    {
        $data = parent::toArray($request);
        $data['icon'] = strpos($data['icon'],'https') === false ? sprintf('%s/%s', aliyun_domain(), $data['icon']) : $data['icon'];
        return $data;
    }
}
